var upload1;
window.onload = function() {
     upload1 = new SWFUpload({
         // Backend Settings
	upload_target_url: "/files/save?uni_id=<%=session.id%>",	// Relative to the SWF file
	//post_params: {"sessionid" : "<%=session.to_s%>"},
	// File Upload Settings
        file_size_limit : "102400",	// 100MB
        file_types : "*.*",
        file_types_description : "All Files",
        file_upload_limit : "10",
        file_queue_limit : "0",
        begin_upload_on_queue : true,
        
	// Event Handler Settings
        file_queued_handler : uploadStart,
        file_progress_handler : uploadProgress,
        file_cancelled_handler : uploadCancel,
        file_complete_handler : uploadComplete,
        queue_complete_handler : uploadQueueComplete,
        error_handler : uploadError,

        // Flash Settings
        flash_url : "/flash/swfupload.swf",	// Relative to this file
        
	// UI Settings
        ui_container_id : "flashUI1",
        degraded_container_id : "degradedUI1",

        // Debug Settings
        debug: false 
});
     upload1.addSetting("progress_target", "fsUploadProgress1");	// Add an additional setting that will later be used by the handler.

}
